package com.huixh.train.member.controller.admin;

import com.huixh.train.common.resp.PageResult;
import com.huixh.train.member.req.TicketQueryReq;
import com.huixh.train.member.resp.TicketQueryResp;
import com.huixh.train.member.service.TicketService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author huixh
 */
@RestController
@RequestMapping("/admin/ticket")
public class TicketAdminController {

    @Resource
    private TicketService ticketService;

    @PostMapping("/query-list")
    public PageResult<?> queryList(@Valid TicketQueryReq req) {
        PageResult<List<TicketQueryResp>> pageResult = ticketService.queryList(req);
        return pageResult;
    }

}
